package com.tianyiyan.tyenword;


import java.util.List;
import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.Action;
import com.tianyiyan.dao.tyenword.BookDao;
import com.tianyiyan.hibernate.tyenword.Book;

public class HomeAction implements Action
{
	private List<Book> books;
	public List<Book> getBooks() {
		return books;
	}
	public void setBooks(List<Book> books) {
		this.books = books;
	}
	@Override
	public String execute() throws Exception
	{
		BookDao dao = new BookDao();
		this.books = dao.getBookList();
		return SUCCESS;
	}
}
